/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package demo06;

/**
 *
 * @author Administrator
 */
public class Man {
    private String eyescolor;
    
   public String getEyescolor(){
       return eyescolor;
   }
      public void setEyescolor(String eyescolor){
         this.eyescolor=eyescolor;
        }
      public String getColor(){
          return null;
}
      public static void main(String[] args) {
        Man aisa=new AisaMan();
          System.out.println("亚洲人的皮肤是"+aisa.getColor());
          Man euro=new EuroMan();
          System.out.println("欧洲人的皮肤是"+euro.getColor());
          Man china=new ChinaMan();
          System.out.println("中国人的皮肤是"+china.getColor());
          Man USA=new USAMan();
          System.out.println("美国人的皮肤是"+USA.getColor());
          Man Eng=new EngMan();
          System.out.println("英国人的皮肤是"+Eng.getColor());
    }
      }
class AisaMan extends Man{

    @Override
    public String getColor() {
        return "黄皮肤的";
    }
    
    public static void main(String[] args) {
        AisaMan aisa=new AisaMan();
        aisa.setEyescolor("黑色的");
        System.out.println("亚洲人眼睛是"+aisa.getEyescolor());
    }
    
} 
    class EuroMan extends Man{

    @Override
    public String getColor() {
        return "白皮肤的";
    }
        
        public static void main(String[] args) {
            EuroMan euro=new EuroMan();
            euro.setEyescolor("蓝色的");
            System.out.println("欧洲人的眼睛颜色是"+euro.getEyescolor());
        }
    }

    class ChinaMan extends Man{

    @Override
    public String getColor() {
        return "黄皮肤的";
    }
        
        public static void main(String[] args) {
            ChinaMan china=new ChinaMan();
            china.setEyescolor("黑色的");
            System.out.println("中国人的眼睛颜色是"+china.getEyescolor());
        }
    }

   class USAMan extends Man{

    @Override
    public String getColor() {
        return "黑皮肤的";
    }
       
       public static void main(String[] args) {
           USAMan USA=new USAMan();
           USA.setEyescolor("紫色");
           System.out.println("美国人的眼睛颜色是"+USA.getEyescolor());
       }
   }
   class EngMan extends Man{

    @Override
    public String getColor() {
        return "白皮肤的";
    }
       
       public static void main(String[] args) {
           EngMan Eng=new  EngMan();
           Eng.setEyescolor("蓝色");
           System.out.println("英国人的眼睛颜色是"+ Eng.getEyescolor());
       }
   }
